#include <assert.h>
#include <stdlib.h>
#include <iostream>
#include <chrono>
#include <thread>

#include "src/MainController.h"
#include "src/Logger.h"

int main() 
{
	CMainController::getInstance()->initConfigure("config");
	std::string filename = 
		CMainController::getInstance()->getConfigure().getConfigValue<std::string>("log", "filename", "reolver");
	std::string loglevel =
		CMainController::getInstance()->getConfigure().getConfigValue<std::string>("log", "loglevel", "INFO");
	std::cout << filename << std::endl;
	std::cout << loglevel << std::endl;
	CLogger::getInstance()->initLogger(filename);
	CLogger::getInstance()->setLoggerLevel(loglevel);

	CMainController::getInstance()->startup();

    return 0;
}
